﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BKO.DataAccesss
{
	public static class BKODataContextSingletone
	{
		private static BKODataContext _context;
		private static object _lockObj = new object();

		public static BKODataContext GetInstance(string connectionString)
		{
			if (_context == null)
			{
				lock (_lockObj)
				{
					if (_context == null)
					{
						_context = new BKODataContext(connectionString);
					}
				}
			}
			return _context;
		}
	}
}
